<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue-2.4.0.js"></script>
</head>

<body>
    <div id="app">
        <!-- 迭代数组 -->
        <ul>
            <li v-for="(item, index) in items" :key="index">
              索引： {{index}}
            </li>
       </ul>

       <!-- 迭代对象中的属性 -->
       <div v-for="(val, key, i) in userInfo">{{val}} --- {{key}} --- {{i}}</div>

       <!-- 迭代数字 -->
       <p v-for="i in 10">这是第 {{i}} 个P标签</p>

    </div>
</body>

<script>
    var vm = new Vue({
        el: '#app',
        data: {
            items: [1,2,3,4,5,6],
            userInfo: {
                name:'zhangsan',
                age:23,
                sex:1
            }
        },
        methods: {

        }
    });
</script>

</html>